﻿using System.Runtime.Serialization;
using System.ServiceModel;
using Navigant.Common;

namespace Navigant.DataContracts
{
    [DataContract(Name = "PreservationNoticeTemplateContract", Namespace = ServiceConstants.DataContractNamespace)]
    [ServiceKnownType(typeof(CaseChildItemContract))]
    public class PreservationNoticeTemplateContract : CaseChildItemContract
    {
        #region Fields

        private string name;
        private string subject;
        private string body;

        #endregion

        #region Constructors

        public PreservationNoticeTemplateContract()
        {
            this.name = string.Empty;
            this.subject = string.Empty;
            this.body = string.Empty;
        }

        #endregion

        #region Properties

        [DataMember]
        public string Name 
        {
            get { return this.name; }
            set
            {
                if (!object.ReferenceEquals(this.name, value))
                {
                    this.name = value;
                    this.RaisePropertyChanged("Name");
                }
            }
        }

        [DataMember]
        public string Subject 
        {
            get { return this.subject; }
            set
            {
                if (!object.ReferenceEquals(this.subject, value))
                {
                    this.subject = value;
                    this.RaisePropertyChanged("Subject");
                }
            }
        }

        [DataMember]
        public string Body 
        {
            get { return this.body; }
            set
            {
                if (!object.ReferenceEquals(this.body, value))
                {
                    this.body = value;
                    this.RaisePropertyChanged("Body");
                }
            } 
        }

        #endregion
    }
}
